package uit.comstore.controller;

import java.util.List;

import uit.comstore.model.blo.ManufacturerBLO;
import uit.comstore.model.blo.ProductBLO;
import uit.comstore.model.blo.ProductUnitBLO;
import uit.comstore.model.entity.Product;

import uit.comstore.model.blo.CategoryBLO;
import uit.comstore.model.blo.FaqBLO;
import uit.comstore.model.entity.Category;
import uit.comstore.model.entity.Faq;

import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings("serial")
public class IndexAction extends ActionSupport {

	private CategoryBLO categoryBLO;
	private List<Category> categoryList;
	private List<Faq> faqList;
	private FaqBLO faqBLO;
	private ProductBLO productBLO;
	private List<Product> productList;
	

	public List<Product> getProductList() {
		return productList;
	}

	public void setProductList(List<Product> productList) {
		this.productList = productList;
	}

	
	public List<Category> getCategoryList() {
		return categoryList;
	}

	public void setCategoryList(List<Category> categoryList) {
		this.categoryList = categoryList;
	}

	public IndexAction() {
		categoryBLO = new CategoryBLO();

		productBLO = new ProductBLO();

		faqBLO = new FaqBLO();
	}


	public String execute() {
		//this.categoryList = categoryBLO.list();
		this.productList = productBLO.list();
		return "success";
	}

	public String faqClient() {
		this.faqList = faqBLO.list();
		return "success";
	}

	public String about() {
		return "success";
	}

	public String contact() {
		return "success";
	}

	public List<Faq> getFaqList() {
		return faqList;
	}

	public void setFaqList(List<Faq> faqList) {
		this.faqList = faqList;
	}

	public FaqBLO getFaqBLO() {
		return faqBLO;
	}

	public void setFaqBLO(FaqBLO faqBLO) {
		this.faqBLO = faqBLO;
	}
	

}
